﻿namespace Bowlus.AppHost
{
    using Bowlus.Common;

    using Microsoft.Practices.Unity;
    using System;
    using System.IO;

    public static class ContainerBootstrapper
    {
        public static void RegisterTypes(IUnityContainer container)
        {
            CommonContainerBootstrapper.RegisterCommonDependencies(container);

            container.RegisterType<IAppRepository, StorageAppRepository>(
                new ContainerControlledLifetimeManager(),
                new InjectionConstructor("System.ConnectionString", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "7zip\\7z.dll")));

            container.RegisterInstance(typeof(AppHostManager), new ContainerControlledLifetimeManager());
        }
    }
}